package com.deer.wms.base.system.service.bill;

import com.deer.wms.base.system.model.bill.BillInDetailDto;
import com.deer.wms.base.system.model.bill.BillOutDetailCriteria;
import com.deer.wms.base.system.model.box.BoxItem;
import com.deer.wms.base.system.service.MESWebService.WebserviceResponse;
import com.deer.wms.common.core.service.Service;
import com.deer.wms.base.system.model.bill.BillOutDetail;
import com.deer.wms.base.system.model.bill.BillOutDetailDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
     * 出库单 服务层
 * 
 * @author cai
 * @date 2019-05-13
 */
public interface IBillOutDetailService extends Service<BillOutDetail,Integer>
{

    List<BillOutDetail>  findByBillOutDetailByCarrierId(String carrierId);

    /**
     *   根据billNo查询BillOutDetail信息
     * @author 李帅辰
     * @date 18:00 2020/10/30
     * @params billNo
     * @return java.util.List<com.deer.wms.base.system.model.bill.BillOutDetailDto>
     **/
    public List<BillOutDetailDto> selectBillOutDetailByBillNo(String billNo);

    List<BillOutDetailDto> getBillOutPlanList(BillOutDetailCriteria criteria);

    /**
     * 根据BillOutDetailId删除BillOutDetail
     *
     */
    public void deleteBillOutDetailByBillOutDetailId(Integer billOutDetailId);

    public void deleteBillOutDetailByBillId(Integer billId);


    /**
     *  根据billId查询BillOutDetail信息
     *
     * @param billId
     * @return
     */
    public List<BillOutDetailDto> findListByBillId(Integer billId);

    public List<BillOutDetailDto> findByBillId(Integer billId);

    /**
     * 同步出库记录表时，手持机以单据号查询
     * @param billNo
     * @return
     */
    public List<BillOutDetailDto> findListByBillNo( String billNo);




    /**
     * 保存BillOutDetail  出库单详情
     *
     * @param billOutDetail
     */
    public Boolean saveBillOutDetail(BillOutDetail billOutDetail);
    /**
     *  MES工单下发接口
     */
    WebserviceResponse downWipToStock(String input);
    WebserviceResponse emptyShelfArrive(String input);

    /**
     * 根据条件查询出库单
     * @param criteria
     * @return
     */
    List<BillOutDetail> findList(BillOutDetailCriteria criteria);

    public List<BillOutDetailDto> findItemDetails(BillOutDetailCriteria criteria);

    /**
     * 修改出库实际数量
     * @param billOutDetail
     * @return
     */
    int updateBillOutMasterQuantityDelivery(BillOutDetail billOutDetail);

    public Integer findItemCount(BoxItem boxItem);

    BillOutDetail findBybillOutDetailId(Integer billOutDetailId);

    BillOutDetail findByBillOutDetail(String materialId);

}
